package project.Mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import project.Pojo.Patient;

import java.util.List;


@Mapper
public interface PatientMapper {
    @Select("select * from patient")
    List<Patient> SelectAll();

    @Select("select * from patient where username = #{username}")
    List<Patient> SelectByUsername(String username);

    @Insert("INSERT INTO patient(username,password) values (#{username},#{password})")
    void InsertAll(String username, String password);


    @Update("update patient set password = #{password} where username = #{username}")
    void UpdatePassword(String username, String password);

}
